package com.byzx.wine.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.byzx.wine.dao.WinebrandMapper;
import com.byzx.wine.jdbcdao.WineBrandDao;
import com.byzx.wine.po.Winebrand;
import com.byzx.wine.service.IWineBandService;
import com.byzx.wine.util.Page;

@Service
public class WineBrandServiceimpl implements IWineBandService {
	@Autowired
	private WineBrandDao winebranddao;

	@Autowired
	private WinebrandMapper winebrandMapper;
	


	@Override
	public int insert(Winebrand Winebrand) {
		// TODO Auto-generated method stub
		return winebrandMapper.insert(Winebrand);
	}

	
	@Override
	public Page<Map<String, Object>> findPage(Page<Map<String, Object>> page) {
		
		return winebranddao.findPage("com.byzx.wine.jdbcdao.WineBrandDao.findall", page);
	}


	@Override
	public Winebrand selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return winebrandMapper.selectByPrimaryKey(id);
	}


	@Override
	public int updateByPrimaryKeySelective(Winebrand winebrand) {
		// TODO Auto-generated method stub
		return winebrandMapper.updateByPrimaryKeySelective(winebrand);
	}


	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return winebrandMapper.deleteByPrimaryKey(id);
	}


	@Override
	public int deleteall(String id) {
		// TODO Auto-generated method stub
		return 0;
	}

	
	
}
